<!--
 * @Author: luojiajun
 * @Email: company.kachun@gmail.com
 * @Date: 2021-07-01 18:43:47
 * @FilePath: /src/views/service/billboard/index.vue
 * @LastEditTime: 2021-07-03 15:04:08
 * @LastEditors: luojiajun
-->
<template>
    <div class="app-container app-height">
        <div class="">
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="服务看板" name="1">
                    <billboard-dashboard ref="dashboard"></billboard-dashboard>
                </el-tab-pane>
                <el-tab-pane label="服务预警" name="2">
                    <billboard-warning ref="warning"></billboard-warning>
                </el-tab-pane>
                <el-tab-pane label="变更信息" name="3">
                    <billboard-information ref="information"></billboard-information>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>

<script>
import billboardDashboard from "@/views/service/billboard/components/billboardDashboard.vue"
import billboardWarning from "@/views/service/billboard/components/billboardWarning"
import billboardInformation from "@/views/service/billboard/components/billboardInformation"

export default {
    name: "BillboardIndex",
    components: {
        billboardDashboard,
        billboardWarning,
        billboardInformation
    },
    data() {
        return {
            activeName: '1'
        }
    },
    methods: {
        handleClick(value) {
            value.name == 1 && this.$refs.dashboard.fetchData()
            value.name == 2 && this.$refs.warning.fetchData()
            value.name == 3 && this.$refs.information.fetchData()
        }
    }
};
</script>

<style lang="scss" scoped>
@import "~@/assets/styles/system/common.scss";
</style>
